package com.chaopei.day38.service.impl;

import com.chaopei.day38.mappers.UserMapper;
import com.chaopei.day38.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author Corday 天涯
 * @Date 2022/4/22 14:37
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public boolean login(String username, String password) {
        //一般要作数据校验
        Integer flag = userMapper.selectUser(username, password);
        //查到用户为非null
        return flag != null;
    }
}
